Ext.define('CMS.views.logup.LogupWinMain',{
    extend:'Ext.window.Window',

    requires:[
        'CMS.controllers.logup.LogupWinMainController'
    ],

    xtype:'LogupWinMain',
    controller:'LogupWinMainController',



    autoShow: true,
/*    height: 200,
    width: 360,*/
    layout: {
        type:'fit'
    },
    title:'注册信息表',
    iconCls: 'fa fa-key fa-lg',
    closeAction: 'hide',
    closable: false,
    draggable: false,
    resizable: false,

    items: [
        {
            xtype: 'form',
            reference:'logupMainForm',
            bodyPadding:20,

            defaults: {
                xtype: 'textfield',
                anchor: '100%',
                labelWidth: 70,
                allowBlank: false,
                msgTarget: 'side',
                listeners:{
                    specialKey:'onEnterPress'
                }
            },
            items:[
                {
                    name: 'username',
                    fieldLabel: '用户名',
                    minLength: 3,
                    maxLength: 25,
                    allowBlank: false,
                    vtype: 'alphanum'
                },
                {
                    inputType: 'password',
                    name: 'password',
                    fieldLabel: '密码',
                    allowBlank: false,
                    minLength: 5,
                    maxLength: 20
                },
                {
                    fieldLabel: '电子邮箱',
                    name: 'email',
                    vtype: 'email',
                    allowBlank: false
                },
                {
                    fieldLabel: '电话号码',
                    labelWidth: 100,
                    name: 'phone',
                    width: 200,
                    emptyText: 'xxx-xxx-xxxx',
                    maskRe: /[\d\-]/,
                    regex: /^\d{3}-\d{3}-\d{4}$/,
                    regexText: 'The format must be xxx-xxx-xxxx'
                }]
        }
    ],
    dockedItems:[
        {
            xtype:'toolbar',
            dock:'bottom',
            items:[
                '->',
                {
                    xtype:'button',
                    iconCls:'fa fa-sign-in fa-lg',
                    text:'提交',
                    formBind:true,
                    handler:'onSubmitButtonCick'
                }
            ]
        }
    ]

})